using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Dapper.Contrib.Extensions;
using Publicuse.Entity.AttributeUtil;
using SqlSugar;

namespace Publicuse.Entity
{
  /// <summary>
  /// 节假日信息
  /// </summary>
  [DBTable("`geeker-holiday`", "节假日信息")]
  [Table("`geeker-holiday`")]
  [SugarTable("`geeker-holiday`")]
  public class Holiday : BaseModel<long>
  {
    [Remark("年份")]
    public int hYear { get; set; } = -1;

    [Remark("名称")]
    public string hName { get; set; }

    [Remark("开始日期")]
    public string hsTime { get; set; } = null;

    [Remark("结束日期")]
    public string heTime { get; set; } = null;

    public Holiday()
    {
      this.Id = 0;
    }
  }

  /// <summary>
  /// 节假日查询参数
  /// </summary>
  public class HolidayQuery : CommonQuery
  {
    public int hId { get; set; }

    public string hName { get; set; }

    public string hYear { get; set; }

    public string cTime { get; set; }

    public HolidayQuery()
    {
      this.exportName = GetExportName;
      this.businessType = BusinessType.holiday;
    }

    public static string GetExportName
    {
      get { return "holiday"; }
    }
  }
}
